1. Field of the Invention
This invention relates to a database system for storing a database divided into a plurality of storage units by distributing the storage units to a low-speed memory medium and a high-speed memory medium, and more particularly relates to the improvement of an exclusive control method to prevent simultaneous updating of the same storage unit by a plurality of database processing programs in the database system.
2. Description of the Prior Art
One database system is provided with a database comprising a plurality of areas called "storage units", a plurality of system buffers designated by a series of numbers to temporarily store the storage units accessed by processing programs for retrieval and updating.
This system prevents simultaneous updating of the same storage unit by a plurality of processing programs and at the same time enables sharing of the database by a plurality of processing programs for retrieval and updating. For this purpose, each storage unit is separately put to exclusive control status according to the exclusive control table and the updated storage units are kept under exclusive control until completion of the processing program. For example, when the processing program requests retrieval processing of a certain storage unit, the applicable storage unit is read from the database and stored to the system buffer. Thus, the storage unit can be accessed by the processing program. At the same time, the exclusive control table is updated to place that storage unit under exclusive control. Next, when a processing program terminates the operation, the storage units which the processing program stored in the system buffers is written to the database in numerical order beginning with the buffer of the smallest number. When all the updated storage units are written to the database, the exclusive control table is updated so that the written storage units are released from the exclusive control. Thus, updated storage units can be accessed from other processing programs.
The database systems perform and release the exclusive control for storage units as mentioned above, but this method had a drawback.
Updated storage units among those stored in the system buffer for the completed processing program are written to the database beginning with the ones in the system buffer of the smallest number, and the storage units are released only when all the updated storage units are written to the database. For this reason, exclusive control of storage units is not released soon after completion of the processing program. This makes waiting time longer and the throughput of the whole system declines.